<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="regform.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Student Registration Form </title>

<style type="text/css">@import url("<?php echo base_url() . 'css/style.css'; ?>");</style>
<style type="text/css">@import url("<?php echo base_url() . 'css/regform.css'; ?>");</style>
<style type="text/css">@import url("<?php echo base_url() . 'development-bundle/themes/base/ui.all.css'; ?>");</style>
<style type="text/css">@import url("<?php echo base_url() . 'css/jquery.fancybox-1.3.4.css'; ?>");</style>

<script type="text/javascript" src="<?php echo base_url();?>js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery.autocomplete.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/register.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/datetimepicker_css.js"></script>

<script type="text/javascript">
var uri = "<?php echo site_url('ajax')."/"; ?>";
var baseuri = "<?php echo base_url(); ?>";
var site = "<?php echo site_url();?>";


function cek_session()
{
	$(document).ready(function(){
		$.ajax({
			type: 'POST',
			url: uri +'cek_session',
			data: $(this).serialize(),
			success: function(data){ if (data == 'FALSE'){ window.close(); } }
		})
		return false;	
	}); 
}

</script>



<script type="text/javascript">
	
$(document).ready(function(){
		
	$('#ajaxform').submit(function() {
		$.ajax({
			type: 'POST',
			url: $(this).attr('action'),
			data: $(this).serialize(),
			success: function(data) {
				// $('#result').html(data);
				if (data == "true")
				{ location.reload(true); }
				else
				{ document.getElementById("errorbox").innerHTML = data;}
			}
		})
		return false;
	});		

/* end document */		
});


	
</script>

</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="background-color:#fff" onLoad="cek_session()" 
onUnload="window.opener.location.reload(true);">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr height="58">
    <td width="28" background="../images/default/bgpop_01.jpg">&nbsp;</td>
    <td width="*" background="../images/default/bgpop_02a.jpg">
	<div align="center" style="color:#3B5998; font-size:16px; font-weight:bold">
    .: Add New Student :.
    </div>
	</td>
    <td width="28" background="../images/default/bgpop_03.jpg">&nbsp;</td>
</tr>
<tr height="150">
    <td width="28" background="../images/default/bgpop_04a.jpg">&nbsp;</td>
    <td width="0" style="background-color:#FFFFFF">
    <!-- CONTENT GOES HERE //--->
    <form name="main" id="form" method="post" action="<?php echo $form_action; ?>" enctype="multipart/form-data">    
    
    <table width="100%" border="0" cellspacing="0">
    <tr>
    	<td width="45%" valign="top"><!-- Kolom Kiri-->
        <table width="100%" border="0" cellspacing="0" id="table">
        <tr>
        	<td height="30" colspan="3"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" style="background-color:#ffcc66">&nbsp;</font>&nbsp;<font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="Gray"> <strong> Personal Data </strong> </font>
          	<!--hr width="300" style="line-height:1px; border-style:dashed" align="left" color="#000000" /-->
            <div style="border-bottom:1px dashed #666666; border-width:thinl; margin-bottom:5px; margin-top:3px;"></div>            </td>
        </tr>
        <tr>
          <td>N I S N</td>
          <td colspan="2"><input type="text" name="nisn" id="nisn" size="30" maxlength="50"/></td>
        </tr>
        
        <tr>
        <td width="22%"><strong>Name</strong></td>
      	<td colspan="2">
          	<input type="text" name="tname" id="name" size="30" maxlength="100"  value="" /> </td>
        </tr>
        
        <tr>
          	<td><strong> Gender </strong></td>
          	<td colspan="2">
            <input type="radio" name="rgender" value="m" checked='checked'/>&nbsp; Male &nbsp;&nbsp;
            <input type="radio" name="rgender" value="f"/>&nbsp;Female</td>
        </tr>
        
        <tr>
        <td><strong> Birth Place </strong></td>
        <td colspan="2">
          	<input type="text" name="tmplahir" id="tmplahir" size="30" maxlength="50" /> </td>
        </tr>
        
        <tr>
          	<td><strong> Date Of Birth </strong></td>
          	<td colspan="2">
          		<table cellpadding="0" cellspacing="0" border="0">
                <tr>
                <td> <input type="Text" name="tdate" id="d1" title="Born date" size="10" class="form_field" /> 
                 <img src="<?php echo base_url();?>/jdtp-images/cal.gif" onClick="javascript:NewCssCal('d1','yyyymmdd')" style="cursor:pointer"/>
                </td>    
                </tr>
            	</table>
        </tr>
        
        <tr>
          	<td><strong> Religion </strong></td>
          	<td colspan="2">
            	<div id="InfoAgama">
            	<select name="creligion" class="required">
                <option value="">[Select Religion]</option>
                <option value="Islam"> Islam  </option>
                <option value="Katolik"> Katolik  </option>
                <option value="Protestan"> Protestan </option>
                <option value="Hindu"> Hindu </option>
                <option value="Budha"> Budha </option>
                <option value="Others"> Others </option>
                </select>
            	</div> 
             </td>
		</tr>

        <tr>
          	<td><strong> Financial Status </strong></td>
          	<td colspan="2"><div id="InfoKondisi">
              	<select name="kondisi" class="required">
              	<option value="">[Select Condition]</option>
                <option value="Berkecukupan"> Berkecukupan </option>
                <option value="Kurang Mampu"> Kurang Mampu </option>
                <option value="Kaya Raya"> Kaya Raya </option>
                </select> </div> </td>
        </tr>
        
        <tr>
          	<td> Nationality </td>
          	<td colspan="2">
            <input type="radio" name="rnational" id="warga" value="WNI" checked='checked' />&nbsp;WNI&nbsp;&nbsp;
            <input type="radio" name="rnational" id="warga" value="WNA" />&nbsp;WNA</td>
      	</tr>
        <tr>
        
          	<td> Child To </td>
          	<td colspan="2">
          	<input type="text" name="urutananak" id="urutananak" size="3" maxlength="3" onFocus="showhint('Urutan anak tidak boleh lebih dari 3 angka!', this, event, '120px');panggil('urutananak');" value="1" onKeyPress="return focusNext('jumlahanak', event)" onblur="unfokus('urutananak')"/>
            &nbsp;Of&nbsp;
            <input type="text" name="jumlahanak" id="jumlahanak" size="3" maxlength="3" onFocus="showhint('Jumlah saudara tidak boleh lebih dari 3 angka!', this, event, '120px');panggil('jumlahanak');" value="1" onKeyPress="return focusNext('bahasa', event)" onblur="unfokus('jumlahanak')"/>
            Children &nbsp; </td>
        </tr>
        
        <tr>
          	<td> Image </td>
          	<td colspan="2">
            <input type="file" id="file" name="nama_foto" style="width:215px" size="25" /></td>
        </tr>
        
        <tr>
          	<td valign="top"> Address </td>
          	<td colspan="2">
          	<textarea name="alamatsiswa" rows="2" cols="30" ></textarea>  </td>
        </tr>
        
        <tr>
          	<td> Zip Code </td>
          	<td colspan="2">
          	<input type="text" name="kodepos" id="kodepos" size="5" maxlength="8" /> </td>
        </tr>
        
        <tr>
          	<td> Phone </td>
          	<td colspan="2"> <input type="text" name="telponsiswa" maxlength="20" /> </td>
        </tr>
        
        <tr>
          	<td> Mobile </td>
          	<td colspan="2"> <input type="text" name="hpsiswa" maxlength="30"/> </td>
        </tr>
        
        <tr>
          	<td>Email</td>
          	<td colspan="2">
          <input type="text" name="emailsiswa" id="emailsiswa" size="30" maxlength="100" onFocus="showhint('Alamat email tidak boleh lebih dari 100 karakter!', this, event, '120px');panggil('emailsiswa')" value="" onKeyPress="return focusNext('dep_asal', event)" onblur="unfokus('emailsiswa')"/>          	</td>
        </tr>
        
      	<tr>
       		<td valign="top"> School Of Origin </td>
          	<td>
            <div id="depInfo">                                
               <input type="text" name="hpsiswa" maxlength="30"/>
			</div>  </td>
        </tr>
        
        <tr>
          	<td rowspan="2" valign="top"> School Of Origin - Description </td>
          	<td colspan="2"><textarea name="ketsekolah" id="ketsekolah" rows="2" cols="30"></textarea></td>
        </tr>
      	</table>
                     
      	<!-- Akhir Kolom Kiri-->
      	<td width="1%" align="center" valign="middle"  style="border-left:1px dashed #333333; border-width:thin"></td>
      	<td width="*" valign="top"><!-- Kolom Kanan-->
        <table width="100%" border="0" cellspacing="0" id="table">
    	<tr>
         	<td height="30" colspan="3" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif" style="background-color:#ffcc66">&nbsp;</font>&nbsp;<font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="Gray"><strong>Riwayat Kesehatan</strong></font>
            <!--hr width="375" style="line-height:1px; border-style:dashed" align="left" color="#000000" /-->
            <div style="border-bottom:1px dashed #666666; border-width:thinl; margin-bottom:5px; margin-top:3px;"></div>
            </td>
        </tr>
        <tr>
          	<td width="20%" valign="top" >Gol. Darah</td>
          	<td colspan="2">
            <input type="radio" name="gol" id="gol" value="A"
			 onKeyPress="return focusNext('berat', event)"/>&nbsp;A&nbsp;&nbsp;
            <input type="radio" name="gol" id="gol" value="AB" 
             onKeyPress="return focusNext('berat', event)"/>&nbsp;AB&nbsp;&nbsp;
            <input type="radio" name="gol" id="gol" value="B" 
             onKeyPress="return focusNext('berat', event)"/>&nbsp;B&nbsp;&nbsp;
            <input type="radio" name="gol" id="gol" value="O" 
             onKeyPress="return focusNext('berat', event)"/>&nbsp;O&nbsp;&nbsp;
            <input type="radio" name="gol" id="gol" value=""   
          	checked onKeyPress="return focusNext('berat', event)"/>&nbsp;<em>(belum ada data)</em></td>
  		</tr>
        <tr>
          	<td>Berat</td>
          	<td colspan="2"><input name="berat" type="text" size="6" maxlength="6" id="berat" onFocus="showhint('Berat badan tidak boleh lebih dari 6 angka!', this, event, '120px');panggil('berat')" value="0" onKeyPress="return focusNext('tinggi', event)" onblur="unfokus('berat')"/>
            &nbsp;kg</td>
        </tr>
        <tr>
        	<td>Tinggi</td>
          	<td colspan="2"><input name="tinggi" type="text" size="6" maxlength="6" id="tinggi" onFocus="showhint('Tinggi badan tidak boleh lebih dari 6 angka!', this, event, '120px');panggil('tinggi')" value="0"  onKeyPress="return focusNext('kesehatan', event)" onblur="unfokus('tinggi')"/>
            &nbsp;cm</td>
        </tr>
        <tr>
            <td valign="top">Riwayat Penyakit</td>
            <td colspan="2"><textarea name="kesehatan" id="kesehatan" rows="2" cols="30" class="Ukuranketerangan" onFocus="showhint('Riwayat penyakit tidak boleh lebih dari 255 karakter!', this, event, '120px');panggil('kesehatan')"  onKeyPress="return focusNext('namaayah', event)" onblur="unfokus('kesehatan')"></textarea></td>
        </tr>
        <tr>
            <td height="30" colspan="3">
            <font size="2" face="Verdana, Arial, Helvetica, sans-serif" style="background-color:#ffcc66">&nbsp;</font>&nbsp;<font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="Gray"><strong>Data Orang Tua Siswa</strong></font>
            <!--hr width="375" style="line-height:1px; border-style:dashed" align="left" /-->
            <div style="border-bottom:1px dashed #666666; border-width:thinl; margin-bottom:5px; margin-top:3px;"></div>
            </td>
        </tr>
        <tr>
        	<td>&nbsp;</td>
          	<td align="center" valign="middle" bgcolor="#DBD8F3"><strong>Ayah</strong></td>
          	<td align="center" valign="middle" bgcolor="#E9AFCF"><strong>Ibu</strong></td>
      	</tr>
        <tr>
          	<td valign="top">Nama</td>
          	<td bgcolor="#DBD8F3">
            	<input name="namaayah" type="text" size="15" maxlength="100" id="namaayah" onFocus="showhint('Nama Ayah tidak boleh lebih dari 100 karakter!', this, event, '120px');panggil('namaayah')"  value="" class="ukuran"  onKeyPress="return focusNext('namaibu', event)" onblur="unfokus('namaayah')"/>
              	<br />
              	<input type="checkbox" name="almayah" id="almayah" value="1" title="Klik disini jika Ayah Almarhum"  
        		 
        		/>
                &nbsp;&nbsp;<font color="#990000" size="1">(Almarhum)</font> </td>
         	<td bgcolor="#E9AFCF">
            	<input name="namaibu" type="text" size="15" maxlength="100" id="namaibu" onFocus="showhint('Nama Ibu tidak boleh lebih dari 100 karakter!', this, event, '120px');panggil('namaibu')" value="" class="ukuran" onKeyPress="return focusNext('Infopendidikanayah', event)" onblur="unfokus('namaibu')"/>
                <br />
                <input type="checkbox" name="almibu" id="almibu" value="1" title="Klik disini jika Ibu Almarhumah"
        		/>
                        &nbsp;&nbsp;<font color="#990000" size="1">(Almarhumah)</font> </td>
     	</tr>
        <tr>
        	<td>Pendidikan</td>
            <td bgcolor="#DBD8F3">
            	<div id = "pendidikanayahInfo">
            	<select name="pendidikanayah" id="Infopendidikanayah" class="ukuran"  onKeyPress="return focusNext('Infopendidikanibu', event)" onfocus="panggil('Infopendidikanayah')" style="width:140px" onblur="unfokus('Infopendidikanayah')">
                <option value="">[Pilih Pendidikan]</option>
                                          <option value="D1" >
                          D1                          </option>
                                                    <option value="D3" >
                          D3                          </option>
                                                    <option value="S1" >
                          S1                          </option>
                                                    <option value="S2" >
                          S2                          </option>
                                                    <option value="S3" >
                          S3                          </option>
                                                    <option value="SD" >
                          SD                          </option>
                                                    <option value="SMA" >
                          SMA                          </option>
                                                    <option value="SMP" >
                          SMP                          </option>
                                      	</select> 
                </div>            </td>
        	<td bgcolor="#E9AFCF">
            	<table cellpadding="0" cellspacing="0">
            	<tr>
                	<td>
                    <div id = "pendidikanibuInfo">
                    <select name="pendidikanibu" id="Infopendidikanibu" class="ukuran"  onKeyPress="return focusNext('Infopekerjaanayah', event)" onfocus="panggil('Infopendidikanibu')" style="width:140px" onblur="unfokus('Infopendidikanibu')">
                    <option value="">[Pilih Pendidikan]</option>
                                                        <option value="D1" >
                            D1                            </option>
                                                        <option value="D3" >
                            D3                            </option>
                                                        <option value="S1" >
                            S1                            </option>
                                                        <option value="S2" >
                            S2                            </option>
                                                        <option value="S3" >
                            S3                            </option>
                                                        <option value="SD" >
                            SD                            </option>
                                                        <option value="SMA" >
                            SMA                            </option>
                                                        <option value="SMP" >
                            SMP                            </option>
                                                </select>
                    </div>                    </td>
                    <td>
					                        <img src="../images/ico/tambah.png" onClick="tambah_pendidikan();" onMouseOver="showhint('Tambah Tingkat Pendidikan!', this, event, '80px')" />
                                        </td>
          		</tr>
                </table>          	</td>
    	</tr>
        <tr> 
        	<td>Pekerjaan</td>
           	<td bgcolor="#DBD8F3">
            	<div id="pekerjaanayahInfo">
            	<select name="pekerjaanayah" id="Infopekerjaanayah" class="ukuran"  onKeyPress="return focusNext('Infopekerjaanibu', event)" onfocus="panggil('Infopekerjaanayah')" style="width:140px" onblur="unfokus('Infopekerjaanayah')">
                	<option value="">[Pilih Pekerjaan]</option>
				                	<option value="Ibu Rumah Tangga">
                        Ibu Rumah Tangga                        </option>
                                        	<option value="PNS">
                        PNS                        </option>
                                        	<option value="Wiraswasta">
                        Wiraswasta                        </option>
                                        </select>
                </div>            </td>
           	<td bgcolor="#E9AFCF">
            	<table cellpadding="0" cellspacing="0">
                <tr>
                	<td>
                    <div id = "pekerjaanibuInfo">
                    <select name="pekerjaanibu" id="Infopekerjaanibu"  class="ukuran"  onKeyPress="return focusNext('penghasilanayah1', event)" onfocus="panggil('Infopekerjaanibu')" style="width:140px" onblur="unfokus('Infopekerjaanibu')">
                        <option value="">[Pilih Pekerjaan]</option>
                                                      <option value="Ibu Rumah Tangga">
                              Ibu Rumah Tangga                        </option>
                                                      <option value="PNS">
                              PNS                        </option>
                                                      <option value="Wiraswasta">
                              Wiraswasta                        </option>
                                                  </select>
                   	</div>                    </td>
                    <td>
                                        <img src="../images/ico/tambah.png" onClick="tambah_pekerjaan();" onMouseOver="showhint('Tambah Jenis Pekerjaan!', this, event, '80px')" />
                                        </td>
             	</tr>
                </table>         	</td> 
    	</tr> 
       
        <tr>
          	<td>Penghasilan</td>
          	<td bgcolor="#DBD8F3">
            	<input type="text" name="penghasilanayah1" id="penghasilanayah1"  maxlength="20" value="Rp 0." onblur="formatRupiah('penghasilanayah1');unfokus('penghasilanayah1')" onfocus="unformatRupiah('penghasilanayah1');panggil('penghasilanayah1')" class="ukuran"  onKeyPress="return focusNext('penghasilanibu1', event)" onKeyUp="penghasilan_ayah()" >
				<input type="hidden" name="penghasilanayah" id="penghasilanayah" value="0">         	</td>
          	<td bgcolor="#E9AFCF">
            	<input type="text" name="penghasilanibu1" id="penghasilanibu1" maxlength="20" value="Rp 0." onblur="formatRupiah('penghasilanibu1');unfokus('penghasilanibu1')" onfocus="unformatRupiah('penghasilanibu1');panggil('penghasilanibu1')" class="ukuran"  onKeyPress="return focusNext('emailayah', event)" onKeyUp="penghasilan_ibu()" />
				<input type="hidden" name="penghasilanibu" id="penghasilanibu" value="0">          	</td>
  		</tr>
       <tr>
          <td>Email Ortu</td>
          <td bgcolor="#DBD8F3"><input name="emailayah" type="text" size="15" maxlength="100" id="emailayah" onFocus="showhint('Alamat email Ayah tidak boleh lebih dari 100 karakter!', this, event, '120px');panggil('emailayah')" value="" class="ukuran" onKeyPress="return focusNext('emailibu', event)" onblur="unfokus('emailayah')" /></td>
          <td colspan="2" bgcolor="#E9AFCF"><input name="emailibu" type="text" size="15" maxlength="100" id="emailibu" onFocus="showhint('Alamat email Ibu tidak boleh lebih dari 100 karakter!', this, event, '120px');panggil('emailibu')" value="" class="ukuran" onKeyPress="return focusNext('namawali', event)" onblur="unfokus('emailibu')" /></td>
        </tr>
        <tr>
        	<td>Nama Wali</td>
          	<td colspan="2">
            	<input type="text" name="namawali" id="namawali" maxlength="100" value="" size="30"  onKeyPress="return focusNext('alamatortu', event)" onfocus="panggil('namawali')" onblur="unfokus('namawali')"/></td>
        </tr>
        <tr>
          	<td valign="top">Alamat Orang Tua </td>
          	<td colspan="2">
            	<textarea name="alamatortu" id="alamatortu" rows="2" cols="30" class="Ukuranketerangan" onkeypress="return focusNext('telponortu', event)" onfocus="panggil('alamatortu')" onblur="unfokus('alamatortu')"></textarea></td>
      	</tr>
        <tr>
          	<td>Telepon Ortu</td>
          	<td colspan="2">
          	<input type="text" name="telponortu" id="telponortu" class="ukuran" maxlength="20" value="" onKeyPress="return focusNext('hportu', event)" onfocus="panggil('telponortu')" onblur="unfokus('telponortu')"/></td>
        </tr>
        <tr>
          	<td>HP Ortu</td>
          	<td colspan="2">
            <input type="text" name="hportu" id="hportu" class="ukuran" maxlength="20" value=""  onKeyPress="return focusNext('alamatsurat', event)" onfocus="panggil('hportu')" onblur="unfokus('hportu')"/>            </td>
        </tr>
        <tr>
          	<td height="30" colspan="3">
          	<font size="2" face="Verdana, Arial, Helvetica, sans-serif" style="background-color:#ffcc66">&nbsp;</font>&nbsp;<font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="Gray"><strong>Data Lainnya</strong></font>
          	<!--hr width="375" style="line-height:1px; border-style:dashed" align="left" /-->
            <div style="border-bottom:1px dashed #666666; border-width:thinl; margin-bottom:5px; margin-top:3px;"></div>
            </td>
        </tr>
        <tr>
          	<td valign="top">Alamat Surat</td>
          	<td colspan="2">
          	<textarea name="alamatsurat" id="alamatsurat" rows="2" cols="30" class="Ukuranketerangan"  onKeyPress="return focusNext('keterangan', event)" onfocus="panggil('alamatsurat')" onblur="unfokus('alamatsurat')"></textarea>            </td>
        </tr>
        <tr>
          	<td valign="top">Keterangan</td>
          	<td colspan="2">
            <textarea name="keterangan" id="keterangan" rows="2" cols="30" class="Ukuranketerangan" onKeyPress="return focusNext('sum1', event)" onfocus="panggil('keterangan')" onblur="unfokus('keterangan')"></textarea></td>
        </tr>
      	</table>
        <!-- Akhir Kolom Kanan-->
 		</td>
</tr>

<tr height="50">
  	<td valign="middle" align="right">
  	<input type="Submit" value="Simpan" name="Simpan" class="but" id="Simpan" onfocus="panggil('Simpan')" onblur="unfokus('Simpan')"/></td>
  	<td align="center" valign="middle"></td>
  	<td valign="middle"><input class="but" type="button" value="Tutup" name="Tutup"  onClick="tutup()" />
  	</td>
</tr>
</table>
</form>
<!-- END OF CONTENT //--->
    </td>
    <td width="28" background="../images/default/bgpop_06a.jpg">&nbsp;</td>
</tr>
<tr height="28">
	<td width="28" background="../images/default/bgpop_07.jpg">&nbsp;</td>
    <td width="*" background="../images/default/bgpop_08a.jpg">&nbsp;</td>
    <td width="28" background="../images/default/bgpop_09.jpg">&nbsp;</td>
</tr>
</table>

</body>
</html>
